﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="duty.aspx.cs" Inherits="AnyOffice.general.system.attend.duty" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>排班管理</title>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
		<script Language="JavaScript">
		function delete_duty(duty_type_id)
		{
		msg='确认要删除该项排班类型么？';
		if(window.confirm(msg))
		{
		URL="duty_del.aspx?duty_type_id=" + duty_type_id;
		window.location=URL;
		}
		}
		</script>
		
	</HEAD>
	<body class="bodycolor" topmargin="5">
		<form id="Form1" method="post" runat="server">
			<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
				<tr>
					<td class="Big"><img src="/images/menu/attendance.gif" align="absMiddle"><span class="big3"> 新建排班类型</span><br>
					</td>
				</tr>
			</table>
			<div align="center">
				<input type="button" value="新建排班类型" class="BigButton" onClick="location='duty_new.aspx'"
					title="新建排班类型">
			</div>
			<br>
			<table width="95%" border="0" cellspacing="0" cellpadding="0" height="3">
				<tr>
					<td background="/images/dian1.gif" width="100%"></td>
				</tr>
			</table>
			<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
				<tr>
					<td class="Big"><img src="/images/menu/attendance.gif" align="absMiddle"><span class="big3"> 已定义排班类型</span><br>
					</td>
				</tr>
			</table>
			<br>
			<div align="center">
				<asp:Repeater id="rptConfig" runat="server">
				<HeaderTemplate>
				<table border="0" cellspacing="1" width="100%" class="small" bgcolor="#000000" cellpadding="3"
				align="center">
					<TR class="TableHeader">
							<td nowrap align="center">编号</td>
							<td nowrap align="center">排班类型说明</td>
							<td nowrap align="center">第1次登记</td>
							<td nowrap align="center">第2次登记</td>
							<td nowrap align="center">第3次登记</td>
							<td nowrap align="center">第4次登记</td>
							<td nowrap align="center">第5次登记</td>
							<td nowrap align="center">第6次登记</td>
							<td nowrap align="center">公休日</td>
							<td nowrap align="center">操作</td>
					</TR>					
				</HeaderTemplate>
				<ItemTemplate>
					<tr class="TableData">
						<td nowrap align="center"><%#Eval("DutyTypeId")%></td>
						<td nowrap align="center"><%#Eval("DutyName")%></td>
						<td nowrap align="center"><%#Eval("DutyTime1") != DBNull.Value ? Eval("DutyTime1").ToString() + (Eval("DutyType1").ToString() == "1" ? "上班" : "下班") : "" %></td>
						<td nowrap align="center"><%#Eval("DutyTime2") != DBNull.Value ? Eval("DutyTime2").ToString() + (Eval("DutyType2").ToString() == "1" ? "上班" : "下班") : "" %></td>
						<td nowrap align="center"><%#Eval("DutyTime3") != DBNull.Value ? Eval("DutyTime3").ToString() + (Eval("DutyType3").ToString() == "1" ? "上班" : "下班") : "" %></td>
						<td nowrap align="center"><%#Eval("DutyTime4") != DBNull.Value ? Eval("DutyTime4").ToString() + (Eval("DutyType4").ToString() == "1" ? "上班" : "下班") : "" %></td>
						<td nowrap align="center"><%#Eval("DutyTime5") != DBNull.Value ? Eval("DutyTime5").ToString() + (Eval("DutyType5").ToString() == "1" ? "上班" : "下班") : "" %></td>
						<td nowrap align="center"><%#Eval("DutyTime6") != DBNull.Value ? Eval("DutyTime6").ToString() + (Eval("DutyType6").ToString() == "1" ? "上班" : "下班") : "" %></td>
						<td nowrap align="center"><%#Eval("General") != DBNull.Value ? GetGeneralName(Eval("General").ToString()) : "" %></td>
						<td nowrap width="80">
							<a href="duty_edit.aspx?duty_type_id=<%#Eval("DutyTypeId")%>">编辑</a>
							<%#IsUsed(Convert.ToInt32(Eval("DutyTypeId").ToString())) == false ? "<a href=\"javascript:delete_duty('" + Eval("DutyTypeId").ToString() + "');\"> 删除</a>" : "" %>
						</td>
					</tr>
				</ItemTemplate>
				<FooterTemplate>
				</table>
				</FooterTemplate>
				</asp:Repeater>
				<br>
				<input type="button" value="返回" class="BigButton" onClick="location='index.aspx';">
			</div>
		</form>
	</body>
</HTML>
